<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.6"/>
<title>CZPlayer: DBModule类 参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">CZPlayer
   &#160;<span id="projectnumber">3.0.0</span>
   </div>
   <div id="projectbrief">CZPlayer应用程序</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.8.6 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'搜索');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>首页</span></a></li>
      <li class="current"><a href="annotated.html"><span>类</span></a></li>
      <li><a href="files.html"><span>文件</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="搜索" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>类列表</span></a></li>
      <li><a href="classes.html"><span>类索引</span></a></li>
      <li><a href="hierarchy.html"><span>类继承关系</span></a></li>
      <li><a href="functions.html"><span>类成员</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>全部</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>类</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>文件</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>函数</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>变量</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>枚举</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>枚举值</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>宏定义</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-static-methods">静态 Public 成员函数</a> &#124;
<a href="class_d_b_module-members.html">所有成员列表</a>  </div>
  <div class="headertitle">
<div class="title">DBModule类 参考</div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
静态 Public 成员函数</h2></td></tr>
<tr class="memitem:aa6b3b15ba1e1ec8d902d0b2168105f8d"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_d_b_module.html#aa6b3b15ba1e1ec8d902d0b2168105f8d">initDB</a> ()</td></tr>
<tr class="separator:aa6b3b15ba1e1ec8d902d0b2168105f8d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a338797c1de48e9e72f063262ff1d1fcf"><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_d_b_module.html#a338797c1de48e9e72f063262ff1d1fcf">createConnection</a> ()</td></tr>
<tr class="separator:a338797c1de48e9e72f063262ff1d1fcf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2ba0e92be0762a1c143122038440f30e"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_d_b_module.html#a2ba0e92be0762a1c143122038440f30e">createTable</a> ()</td></tr>
<tr class="separator:a2ba0e92be0762a1c143122038440f30e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ace3c271b20909f9ecadd799e4d6e0760"><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_d_b_module.html#ace3c271b20909f9ecadd799e4d6e0760">readFilePath</a> (QStringList &amp;list)</td></tr>
<tr class="separator:ace3c271b20909f9ecadd799e4d6e0760"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a79611bccda3816489c069a7146b9f362"><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_d_b_module.html#a79611bccda3816489c069a7146b9f362">readMusicListSaveFormatEntity</a> (QList&lt; <a class="el" href="class_music_list_save_format_entity.html">MusicListSaveFormatEntity</a> &gt; &amp;list)</td></tr>
<tr class="separator:a79611bccda3816489c069a7146b9f362"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af2d87fc2deb0116f7981d42d911d348b"><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_d_b_module.html#af2d87fc2deb0116f7981d42d911d348b">readMusicInfoEntity</a> (QList&lt; <a class="el" href="class_music_info_entity.html">MusicInfoEntity</a> &gt; &amp;list)</td></tr>
<tr class="separator:af2d87fc2deb0116f7981d42d911d348b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae9f17b6c46496876f77bea192daf7e9f"><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_d_b_module.html#ae9f17b6c46496876f77bea192daf7e9f">clearDB</a> ()</td></tr>
<tr class="separator:ae9f17b6c46496876f77bea192daf7e9f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1bba2328aa044f56e639391182820356"><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_d_b_module.html#a1bba2328aa044f56e639391182820356">delLine</a> (const QString &amp;fileName)</td></tr>
<tr class="separator:a1bba2328aa044f56e639391182820356"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a170ceff321bc61501b63d18c1248ff35"><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_d_b_module.html#a170ceff321bc61501b63d18c1248ff35">insertLine</a> (const QString &amp;fileName, const QString &amp;time, const QString &amp;filePath)</td></tr>
<tr class="separator:a170ceff321bc61501b63d18c1248ff35"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab46de76e6935e282ef4378a05a0fb7f9"><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_d_b_module.html#ab46de76e6935e282ef4378a05a0fb7f9">updateAlbumUrlPath</a> (const QString &amp;fileName, const QString &amp;albumUrlPath)</td></tr>
<tr class="separator:ab46de76e6935e282ef4378a05a0fb7f9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4e5d6efc6419e40703896e5c95045f7b"><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_d_b_module.html#a4e5d6efc6419e40703896e5c95045f7b">readAlbumUrlPathFromDB</a> (const QString &amp;fileName, QString &amp;albumUrlPath)</td></tr>
<tr class="separator:a4e5d6efc6419e40703896e5c95045f7b"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">成员函数说明</h2>
<a class="anchor" id="ae9f17b6c46496876f77bea192daf7e9f"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool DBModule::clearDB </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>清空数据库 </p>
<dl class="section return"><dt>返回</dt><dd>true代表成功，否则失败 </dd></dl>

</div>
</div>
<a class="anchor" id="a338797c1de48e9e72f063262ff1d1fcf"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool DBModule::createConnection </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>连接数据库 </p>
<dl class="section return"><dt>返回</dt><dd>true代表成功，否则失败 </dd></dl>

</div>
</div>
<a class="anchor" id="a2ba0e92be0762a1c143122038440f30e"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void DBModule::createTable </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>创建表 </p>

</div>
</div>
<a class="anchor" id="a1bba2328aa044f56e639391182820356"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool DBModule::delLine </td>
          <td>(</td>
          <td class="paramtype">const QString &amp;&#160;</td>
          <td class="paramname"><em>fileName</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>删除一条记录 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">fileName</td><td>文件名 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>true代表成功，否则失败 </dd></dl>

</div>
</div>
<a class="anchor" id="aa6b3b15ba1e1ec8d902d0b2168105f8d"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void DBModule::initDB </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>初始化数据库 </p>

</div>
</div>
<a class="anchor" id="a170ceff321bc61501b63d18c1248ff35"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool DBModule::insertLine </td>
          <td>(</td>
          <td class="paramtype">const QString &amp;&#160;</td>
          <td class="paramname"><em>fileName</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const QString &amp;&#160;</td>
          <td class="paramname"><em>time</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const QString &amp;&#160;</td>
          <td class="paramname"><em>filePath</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>插入一行记录 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">fileName</td><td>文件名 </td></tr>
    <tr><td class="paramname">time</td><td>播放时间 </td></tr>
    <tr><td class="paramname">filePath</td><td>文件路径 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>true代表成功，否则失败 </dd></dl>

</div>
</div>
<a class="anchor" id="a4e5d6efc6419e40703896e5c95045f7b"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool DBModule::readAlbumUrlPathFromDB </td>
          <td>(</td>
          <td class="paramtype">const QString &amp;&#160;</td>
          <td class="paramname"><em>fileName</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">QString &amp;&#160;</td>
          <td class="paramname"><em>albumUrlPath</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>从数据库中读出歌曲名对应的专辑url </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">fileName</td><td>文件名 </td></tr>
    <tr><td class="paramname">albumUrlPath</td><td>专辑url </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>true代表成功，否则失败 </dd></dl>

</div>
</div>
<a class="anchor" id="ace3c271b20909f9ecadd799e4d6e0760"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool DBModule::readFilePath </td>
          <td>(</td>
          <td class="paramtype">QStringList &amp;&#160;</td>
          <td class="paramname"><em>list</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>从数据库中读出数据显示到音乐里列表中 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">list</td><td>文件路径 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>true代表成功，否则失败 </dd></dl>

</div>
</div>
<a class="anchor" id="af2d87fc2deb0116f7981d42d911d348b"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool DBModule::readMusicInfoEntity </td>
          <td>(</td>
          <td class="paramtype">QList&lt; <a class="el" href="class_music_info_entity.html">MusicInfoEntity</a> &gt; &amp;&#160;</td>
          <td class="paramname"><em>list</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>从数据库读取音乐信息 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">list</td><td>音乐信息集合 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>true代表成功，否则失败 </dd></dl>

</div>
</div>
<a class="anchor" id="a79611bccda3816489c069a7146b9f362"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool DBModule::readMusicListSaveFormatEntity </td>
          <td>(</td>
          <td class="paramtype">QList&lt; <a class="el" href="class_music_list_save_format_entity.html">MusicListSaveFormatEntity</a> &gt; &amp;&#160;</td>
          <td class="paramname"><em>list</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>从数据库中读出数据显示到m3u文件中 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">list</td><td>音乐列表格式集合 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>true代表成功，否则失败 </dd></dl>

</div>
</div>
<a class="anchor" id="ab46de76e6935e282ef4378a05a0fb7f9"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool DBModule::updateAlbumUrlPath </td>
          <td>(</td>
          <td class="paramtype">const QString &amp;&#160;</td>
          <td class="paramname"><em>fileName</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const QString &amp;&#160;</td>
          <td class="paramname"><em>albumUrlPath</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>更新专辑url </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">fileName</td><td>文件名 </td></tr>
    <tr><td class="paramname">albumUrlPath</td><td>专辑url </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>true代表成功，否则失败 </dd></dl>

</div>
</div>
</div><!-- contents -->
<HR style="FILTER: alpha(opacity=100,finishopacity=0,style=3)" width="100%" color=#000000 SIZE=3>
<table width="100%">
<tr>
        <td align="center">
                <a href="http://www.qtcn.org/bbs/read-htm-tid-55824.html"> <img style="height:40px;" src="CZPlayer.png"> </img> </a>
        </td>
</tr>
<tr>
        <td align="center">
                Copyright (C) 2012-2015 Highway-9 Studio.
        </td>
</tr>
